﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UcAsp.Net.Interface;
namespace UcAsp.Net.BLL
{
    public class DefinedCodeSelect:ISelect
    {
        public List<object> Execute(object key)
        {
            List<Model.DefinedCode> list = BLL.DefinedCodeBLL.DefinedCodeName(key.ToString());
            List<Model.Select> query = new List<Model.Select>();
            foreach (Model.DefinedCode c in list)
            {
                Model.Select s = new Model.Select();
                s.Name = c.DefinedName;
                s.Value = c.DefinedNumber;
                query.Add(s);
            }
            return query.ToList<object>();
        }
    }
}
